import os
ls = os.linesep

while True:
	fname = raw_input("Input file name: ")
	if os.path.exists(fname):
		print "File exist!!"
	else:
		break;
all = [];
while True:
	line = raw_input(">");
	if(len(line)==0):
		break;
	else:
		all.append(line);
fobj = open(fname,"w");
fobj.writelines(["%s%s"%(line,ls) for line in all]);
fobj.close();
print "Done!";
